<template>
    <logReg v-if="$store.state.showLogView"></logReg>
    <router-view></router-view>


</template>

<script>
import logReg from './components/logReg';

/* 调整缩放比例 start */
import { monitorZoom } from "@/util/monitorZoom.js";
const m = monitorZoom();
if (window.screen.width * window.devicePixelRatio >= 3840) {
  document.body.style.zoom = 100 / (Number(m) / 2); // 屏幕为 4k 时
} else {
  document.body.style.zoom = 100 / Number(m);
}
/* 调整缩放比例 end */


export default {
  name: 'App',
  created() {
    this.getUser()
  },
  components: {
    logReg
  },
  methods: {
    getUser() {
      let userInfo = JSON.parse(localStorage.getItem('userInfo'))
      if (!userInfo) return
      this.$store.commit('setUser', userInfo)

    }
  },


}
</script>

